﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace B.S.BsicData.Infartrans.Migrations
{
    public partial class 仓库工单 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "DementperModel",
                columns: table => new
                {
                    DepentmentId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    DepentmentName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_DementperModel", x => x.DepentmentId);
                });

            migrationBuilder.CreateTable(
                name: "LocationModeles",
                columns: table => new
                {
                    LocationID = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    LocaTionNum = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    LocaTionName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    LocaTionCapacity = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    LocaTionManage = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    LocaTionCStatus = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    LocaTionSort = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    LocaTionRember = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_LocationModeles", x => x.LocationID);
                });

            migrationBuilder.CreateTable(
                name: "UserModeles",
                columns: table => new
                {
                    UserID = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    UserPhone = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UserModeles", x => x.UserID);
                });

            migrationBuilder.CreateTable(
                name: "WHouseModeles",
                columns: table => new
                {
                    WhouseID = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    WhouseNum = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    WhouseName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Capacity = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    DementperId = table.Column<int>(type: "int", nullable: false),
                    Manager = table.Column<int>(type: "int", nullable: false),
                    Phone = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    WHouseAddr = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Sort = table.Column<int>(type: "int", nullable: false),
                    State = table.Column<int>(type: "int", nullable: false),
                    Lock = table.Column<int>(type: "int", nullable: false),
                    Location = table.Column<int>(type: "int", nullable: false),
                    Rember = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WHouseModeles", x => x.WhouseID);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "DementperModel");

            migrationBuilder.DropTable(
                name: "LocationModeles");

            migrationBuilder.DropTable(
                name: "UserModeles");

            migrationBuilder.DropTable(
                name: "WHouseModeles");
        }
    }
}
